package org.whh.auth.listener;

import org.springframework.beans.factory.annotation.Autowired;
import org.whh.auth.service.IPermissionScanService;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class PermissionScan implements ServletContextListener {
    @Autowired
    IPermissionScanService iPermissionScanService;

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        iPermissionScanService.scan();
    }
}
